< previous page page_51 next page >

Page 51
Table 1.4 Predefined Constants and Values for Common Colors
CONSTANTVALUE
vbBlack&H0
vbRed&HFF
vbGreen&HFF00
vbYellow&HFFFF
vbBlue&HFF0000
vbMagenta&HFF00FF
vbCyan&HFFFF00
vbWhite&HFFFFFF

You can use system-defined colors to give your application a look and feel similar to that provided by other Windows applications. If you use these colors and the user changes the computer's system colors, your application automatically uses the new colors selected by the user. Visual Basic defines the constants shown in Table 1.5 for using system-defined colors.
Table 1.5 Constants for Using System-Defined Colors
CONSTANTVALUECOLOR FOR:
vbScroll bars&H80000000Scroll bars
vbDesktop&H80000001Desktop
vbActiveTitleBar&H80000002Background of the active window's title bar
vbInactiveTitleBar&H80000003Background of inactive windows' title bars
vbMenuBar&H80000004Menu background
vbWindowBackground&H80000005Window background
vbWindowFrame&H80000006Window frame
vbMenuText&H80000007Text in menus
vbWindowText&H80000008Text in windows
vbTitleBarText&H80000009Title bar caption, size box, and scroll arrow text
vbActiveBorder&H8000000ABorders on the active window
vbInactiveBorder&H8000000BBorders on inactive windows
vbApplicationWorkspace&H8000000CMDI application background
vbHighlight&H8000000DBackground of selected items
vbHighlightText&H8000000EText of selected items
vbButtonFace&H8000000FCommand button face shading

Continues

 
< previous page page_51 next page >